let progressbar;
let max = 100;
let current = 0;

$(document).ready(function() {
	$("#abaidu").button({
		classes: {
			"ui-button": "highlight"
		}
	});

	$("#dragdiv").draggable();

	$("#dropdiv1").draggable();
	$("#dropdiv2").on("drop", function(event, ui) {
		console.log("防止");
	});
	$("#dropdiv2").resizable();


	$("#select").sortable();
	// $("#select").selectable();

	$("#accorddiv").accordion();

	let autoTags = ["iwen", "ime", "html", "css", "js", "java", "android", "ios"];
	$("#autoinput").autocomplete({
		source: autoTags
	});

	$("#dateinput").datepicker();

	$("#dialogdiv").dialog();

	progressbar = $("#progressbardiv");
	progressbar.progressbar({
		max: 100
	});
	setInterval(refreshPB,100);
})

function refreshPB(){
	current++;
	if(current>=100){
		current = 0;
	}
	progressbar.progressbar("option","value",current);
}
